<%--
  Created by IntelliJ IDEA.
  User: han tao
  Date: 2023/4/20
  Time: 14:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div class="container" style="width: 400px;">
    <h3 style="text-align: center;">修改奶茶信息</h3>
    <form action="/admin" method="post">
        <%--type=hidden  表单元素中存在元素，不会在页面上渲染，而是隐藏   --%>
        <input type="hidden" name="action" value="updateTea" />
        <input type="hidden" name="id" value="${milkTea.tid}" >
        <div class="form-group">
            <label for="tname">名称</label>
            <input type="text" class="form-control" id="tname" name="tname" value="${milkTea.tname}"  readonly="readonly" placeholder="请输入名称" />
            <div class="form-group">
                <label for="price">价格</label>
                <input type="text" class="form-control" id="price" name="price" value="${milkTea.price}"   placeholder="请输入价格" />
            </div>
            <div class="form-group">
                <label>种类</label>
                <input type="radio" name="genre" value="${milkTea.genre}" checked="checked"/>
            </div>
            <div class="form-group">
                <label for="imgPath">图片</label>
                <select name="imgPath" class="form-control" id="imgPath">
                    <option value="${milkTea.img_path}"><img src="${milkTea.img_path}"></option>
                </select>
            </div>
            <div class="form-group" style="text-align: center">
                <input class="btn btn-primary" type="submit" value="提交" />
                <input class="btn btn-default" type="reset" value="重置" />
                <input type="button" name="Submit" value="返回" onclick="javascript:window.history.back(-1);">
            </div>
        </div>
    </form>
</div>
</body>
</html>
